Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reintroduce quota support, modernized with meson build system #1034

Merged
merged 3 commits into from
May 29, 2024
Merged

Conversation

rdmark
Copy link
Member

@rdmark rdmark commented May 28, 2024

As per discussion in #1028, bring back quota which was removed within this release cycle.

  • Revert Remove quota support from Netatalk 3 #493
  • Forward-port NetBSD patch that was only in 2.x bf1bbf2
  • Modernize quota code, removing ancient platform workarounds
  • Linux ifdefs for code introduced with 450114e (caused build errors for DragonflyBSD; might be a cleaner way to do this...)
  • Forward-port Meson build system scripts from 2.x with modifications

rdmark and others added 2 commits May 28, 2024 14:34
Fix some glaring bugs in the code for the 5.99.x quotas (seteuid'ing
to group ids, using uninitialized group quota values, etc.)

Reviewed-by: Ralph Boehme <[email protected]>
@rdmark rdmark requested a review from a user May 28, 2024 06:10
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rdmark, Great job and detective work! 🕵️‍♂️
At some point in the near future I would like to rationalise all the dependencies and link args in the meson build system so the netatalk executables and libraries are only linked against those required to provide requested features. So, for example, quota_link_args would not be added to the link_args kwarg if quota support was disabled. At the moment this approach is not consistently applied across the code base.

@rdmark
Copy link
Member Author

rdmark commented May 28, 2024

@dgsga Thanks for reviewing. It was surprisingly quite the journey to get to a state that's on par with 2.x.

Do you remember the purpose of this line in the root meson.build scripts? I brought it over verbatim from 2.x and it doesn't seem to have an adverse effect (can still enable quota for many Linux flavors) but don't quite understand it.

elif host_os.contains('linux')
...
cdata.set('NO_QUOTA_SUPPORT', 1)

It's obvious why we do this for Darwin (disable quota support), but not sure why it's needed for Linux here.

Copy link

@rdmark
Copy link
Member Author

rdmark commented May 29, 2024

Answering my own question: Without setting NO_QUOTA_SUPPORT for Linux, compilation fails in nfsquota.c across all Linux distros. It's a dirty hack, but we need it for now...

@rdmark rdmark merged commit 1028943 into main May 29, 2024
15 checks passed
@rdmark rdmark deleted the rdmark-1028 branch May 29, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant